/**
 * @projectName: project02bywdmtz
 * @package: com.cskaoyan.controller
 * @className: WxFootprintController
 * @author: 冉夏
 * @description: TODO
 * @date: 2023/1/2 16:57
 * @version: 1.8
 */

package com.cskaoyan.controller;

import com.cskaoyan.bean.MarketFootprint;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.WxFootHisInfoVo;
import com.cskaoyan.service.WxFootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("wx/footprint")
@RestController
public class WxFootprintController {
    @Autowired
    WxFootprintService footprintService;
    @RequestMapping("list")
    public BaseRespVo getFootprint(BasePageInfo basePageInfo){
        System.out.println(11);
       CommonData<WxFootHisInfoVo> FootprintData =footprintService.getAllFootPrintInfo(basePageInfo);
        return BaseRespVo.ok(FootprintData);
    }
    /*
    * 删除选定的历史足迹   将状态码改为 0==>1
    * */
    @PostMapping("delete")
    public BaseRespVo deleteFootprint(@RequestBody MarketFootprint marketFootprint){
        footprintService.deleteFootprintInfo(marketFootprint.getId());
        return BaseRespVo.ok();
    }
}
